<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%--变量区--%>
<c:set var="ctx" value="${pageContext.request.contextPath}" scope="page"/>
<%!String type = ""; %>
<%--变量区结束--%>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>

    <link rel="stylesheet" href="${ctx}/css/templatemo_style.css"/>
    <!-- 页面整体布局样式定义 -->
    <link rel="stylesheet" href="${ctx}/css/ddsmoothmenu.css"/>
    <!-- 菜单样式定义 -->
    <link rel="stylesheet" href="${ctx}/css/nivo-slider.css" media="screen"/>
    <!-- 焦点图样式定义 -->
    <script type="text/javascript" src="${ctx}/js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="${ctx}/js/jquery.nivo.slider.pack.js"></script>
    <!-- 焦点图JS脚本定义 -->
    <%--自定义方法区--%>
    <script type="text/javascript" src="${ctx}/js/base.js"></script>
    <%--自定义方法区--%>
    <title>订单详细信息</title>
	<!--辅助脚本区域-->
<script>
    function showUserName() {
        var name = "${user.username}";
        if (name != "") {
            $("#login").html(name);
            $("#exitP").show();
            $("#login").attr("href", "${ctx}/userServlet?flag=info&userId=${user.userId}");
        } else {
            $("#exitP").hide();
        }
    }
</script>
<!--辅助脚本区域结束-->
</head>
<body>
<div id='templatemo_body_wrapper'>
    <div id="templatemo_wrapper">

        <%--网页头部--%>
        <div id="templatemo_header">
            <div id="site_title">
                <h1>
                    <a href="#">穿美在线鞋城</a>
                </h1>
            </div>
            <div id="header_right">
                <p>
                    <a href="${ctx}/userServlet?flag=login" id="login" target="_blank">登陆</a>&nbsp;
                    <span id="exitP" style="display: none"><a href="${ctx}/userServlet?flag=logout" id="exit" target="_blank">注销</a></span>
                </p>
            </div>
            <div class="cleaner"></div>
        </div>
        <%--网页头部结束--%>


        <!-- 导航栏 -->
        <div id="templatemo_menubar">
            <div id="top_nav" class="ddsmoothmenu">
                <ul>
                    <li><a href="${ctx}/pro" >首页</a></li>
                    <li><a href="${ctx}/pro?flag=product">产品</a></li>
                    <li><a href="${ctx}/ShoppingCartServlet">我的购物车</a></li>
                    <li><a href="${ctx}/OrderServlet?flag=qoi" class="selected">我的订单</a></li>
                </ul>
                <br style="clear: left"/>
            </div>
            <!-- end of ddsmoothmenu -->
        </div>
        <!-- 导航栏结束 -->

        <%--订单详细信息展示区--%>
        <div id="templatemo_main">
            <div align="center" style="margin-left: 100px">
                <table>
                    <tr>
                        <td width="150">订单编号</td>
                        <td width="200">订单日期</td>
                        <td width="150">订单价格</td>
                    </tr>
                    <c:forEach var="temp" items="${orderList}">
                        <tr>
                            <td width="150"><a
                                    href="${ctx}/OrderServlet?flag=qoa&orderId=${temp.orderId}">${temp.orderId}</a></td>
                            <td width="150">${temp.createTime}</td>
                            <td width="150">${temp.amout}</td>
                        </tr>
                    </c:forEach>
                </table>
            </div>
            <br/>
            <br/>
            <br/>
            <%--分页控制区--%>
            <div align="center">
                <form action="${ctx}/OrderServlet" method="post" id="pageForm">


                    <input type="hidden" id="currentPage" value="" name="currentPage">
                    <input type="hidden" name="pageMethod" value="" id="pageMethod">
                    <input type="hidden" name="flag" value="qoi">
                    <input type="hidden" name="userId" <%--value="${userId}"--%> value="Uba939e3ea7">

                    当前第 <span id="spanCurrentPage">${currentPage}</span> 页， 共有<span id="totalPage">${totalPage}</span>页
                    <p>
                        <a href="javascript:void(0);" onclick="firstPage();">首页</a> |
                        <a href="javascript:void(0);" onclick="previousPage();">上一页</a> |
                        <a href="javascript:void(0);" onclick="nextPage();">下一页</a> |
                        <a href="javascript:void(0);" onclick="lastPage();">尾页</a> |
                    </p>
                </form>
            </div>
            <%--分页控制区--%>
        </div>
        <%--订单详细信息展示区结束--%>

        <!-- footer -->
        <div id="templatemo_footer">
            <p>
                <a href="${ctx}/pro?flag=index">首页</a> | <a
						href="${ctx}/pro?flag=product">产品</a> | <a
						href="${ctx}/ShoppingCartServlet">我的购物车</a> | <a
						href="${ctx}/OrderServlet?flag=qoi">我的订单</a>
            </p>
            版权所有 (c) 2018 <a href="javascript:void(0);">金桥软件</a>
        </div>
        <!-- END of templatemo_footer -->
    </div>
</div>
<script type="text/javascript">
    $(function () {
        $('#slider').nivoSlider();
        showUserName();
    });
</script>
</body>
</html>